#图片文件批量加文字
from PIL import Image
import os
paht = "../day3/images"
new_path = './images/'
if not os.path.exists(new_path) :
    os.mkdir(new_path)

for file in os.listdir(paht) :
    if file.endswith('.png') :
      new_path = './images/'
      new_path += file
      # 图片打开
      i = Image.open(paht+'/'+file)
      new_image = i.copy()
      #图片的保存
      new_image.save(new_path,'PNG')


